Text translation method, device,and storage medium

ABSTRACT

Embodiments of the present disclosure disclose a text translation method, a text translation apparatus, a device and a storage medium. The method includes: obtaining a source language text; and translating the source language text with a modified translation model to obtain a target language text corresponding to the source language text, the modified translation model being obtained by modifying an original translation model based on a text evaluation result of one or more translated texts for training, the translated text for training being an output result after translating through the original translation model, and the text evaluation result for evaluating a contextual semantic relation in the translated text for training.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to and benefits of Chinese PatentApplication No. 201811541940.6, filed on Dec. 17, 2018, the entirecontent of which is incorporated herein by reference.

TECHNICAL FIELD

The present disclosure relates to the field of text translationtechnologies, and more particularly, to a text translation method, atext translation apparatus, a device, and a storage medium.

BACKGROUND

In the related art, a translation model, such as a neural machine model,is mainly based on sentences for translating a whole text. In detail,the text is split into sentences, then the sentences are translatedindividually, and finally translation results of the sentences arecombined in sequence, to obtain a translation result of the text.

SUMMARY

In a first aspect, embodiments of the present disclosure provide a texttranslation method, including: obtaining, by one or more computingdevices, a source language text; and translating, by the one or morecomputing devices, the source language text with a modified translationmodel to obtain a target language text corresponding to the sourcelanguage text, the modified translation model being obtained bytranslating a test text with an original translation model to obtain oneor more translated texts for training, and modifying the originaltranslation model based on a text evaluation result of the one or moretranslated texts for training, and the text evaluation result forevaluating a contextual semantic relation in the translated text fortraining.

In a second aspect, embodiments of the present disclosure provide adevice, including: one or more processors; and a storage device,configured to store one or more programs. When the one or more programsare executed by the one or more processors, the one or more processorsare configured to implement the above text translation method.

In a third aspect, embodiments of the present disclosure provide astorage medium including a computer executable instruction. When thecomputer executable instruction is executed by a computer processor, thecomputer executable instruction is configured to perform the above texttranslation method.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flow chart of a text translation method according to anembodiment of the present disclosure.

FIG. 2 is a flow chart of a text translation method according to anembodiment of the present disclosure.

FIG. 3 is a flow chart of a text translation method according to anembodiment of the present disclosure.

FIG. 4 is a schematic diagram of a modified translation model accordingto an embodiment of the present disclosure.

FIG. 5 is a block diagram of a text translation apparatus according toan embodiment of the present disclosure.

FIG. 6 is a block diagram of a device according to an embodiment of thepresent disclosure.

DETAILED DESCRIPTION

In order to make objects, technical solutions and advantages of thepresent disclosure more apparent, specific embodiments of the presentdisclosure will be described in detail below with reference toaccompanying drawings. It should be understood that, the specificembodiments described herein are only used to explain the presentdisclosure rather than limit the present disclosure.

In addition, it should also be noted that, for convenience ofdescription, only part but not all structures related to the presentdisclosure are illustrated in the accompanying drawings. Beforediscussing exemplary embodiments in detail, it should be noted that someexemplary embodiments are described as processes or methods that aredepicted as flow charts. Although a flow chart describes individualoperations (or steps) as a sequential process, many of the operationscan be performed in parallel, concurrently or simultaneously. Further,the order of the operations may be rearranged. The process may beterminated when its operations are completed, but may also haveadditional steps not included in the drawings. The process maycorrespond to a method, a function, a procedure, a subroutine, asubprogram, and the like.

FIG. 1 is a flow chart of a text translation method according to anembodiment of the present disclosure. The method may be executed by atext translation apparatus that may be implemented in hardware and/orsoftware and generally integrated into a device, such as a server. Themethod includes the following.

At block S110, a source language text is obtained.

In this embodiment, the source language text may be in any language.Further, the source language text may be input by a user, or may beobtained by scanning and image-text conversion or by voice recognition,which is not limited thereto.

At block S120, the source language text is translated with a modifiedtranslation model to obtain a target language text corresponding to thesource language text. The modified translation model is obtained bytranslating a test text with an original translation model to obtain oneor more translated texts for training, and modifying the originaltranslation model based on a text evaluation result of the one or moretranslated texts for training. The translated text for training is anoutput result after translating the test text through the originaltranslation model. The text evaluation result is for evaluating acontextual semantic relation in the translated text for training.

In this embodiment, after the source language text is obtained, thesource language text is translated using the modified translation model.

It is known that existing translation models are generallysentence-level translation models, that is, a translation result of atext to be translated is obtained by translating each sentence in thetext to be translated separately. Therefore, it is difficult forexisting translation models to ensure contextual consistency of the textin the translation result, and the translation fluency is low.

Consequently, in this embodiment, instead of being translated by theexisting translation model, the source language text is translated bythe modified translation model obtained by modifying the originaltranslation model based on the text evaluation result of the translatedtext for training. The text evaluation result is used for evaluating thecontextual semantic relation in the translated text for training.Therefore, modifying the original translation model with the textevaluation result of the translated text for training may improvecontextual semantic consistency of the translated text output by themodified translation model.

It is known that many models may automatically modify their parametersbased on externally feedback data. In this embodiment, the textevaluation result of the translated text for training is external datafed back to the translation model, and the translation model mayautomatically modify its parameters based on the text evaluation result.

This embodiment of the present disclosure provides the text translationmethod. By translating the source language text with the modifiedtranslation model that is modified based on the text evaluation resultof the translated text for training, the text translation methodovercomes technical defects of poor contextual semantics consistency andlow fluency of the translated text obtained by translating each sentenceindependently, improves a translation accuracy of the translation modelthrough effectively modifying the translation model, and furtherimproves contextual semantics consistency and fluency of the translatedtext.

FIG. 2 is a flow chart of a text translation method according to anembodiment of the present disclosure. This embodiment is based on theembodiment in FIG. 1. This embodiment provides an implementation ofembodying the text evaluation result, introducing a model modificationstep, and embodying a manner for obtaining a translated text with anoptimum probability and a translated text with a random probability.

Correspondingly, the method includes the following.

At block S210, the translated text with the optimum probability and thetranslated text with the random probability of the original translationmodel to a test text are obtained.

In this embodiment, modification steps, i.e., blocks 210 to 230, areintroduced. Further, in the present embodiment, the text evaluationresult of the translated text for training includes a text evaluationresult of the translated text with the optimum probability and a textevaluation result of the translated text with the random probability.Therefore, in blocks 210 to 230, the original translation model ismodified based on the text evaluation result of the translated text withthe optimum probability and the text evaluation result of the translatedtext with the random probability.

First, the translated text with the optimum probability and thetranslated text with the random probability of the original translationmodel to the test text are obtained through block 210.

The translated text with the optimum probability may be obtained bytranslating the test text with the original translation model, and byselecting a target word with a maximum probability as a translationresult of a word in a translation process. The translated text with therandom probability may be obtained by translating the test text with theoriginal translation model, and by determining a translation result of aword based on a probability distribution of the target word in atranslation process.

At block S220, the text evaluation result of the translated text withthe optimum probability and the text evaluation result of the translatedtext with the random probability are obtained based on an overallevaluation algorithm and a standard translated text of the test text.The overall evaluation algorithm is configured to evaluate a textsemantic consistency of a whole translated text.

In this embodiment, the text evaluation result of the translated textwith the optimum probability is obtained by calculating through theoverall evaluation algorithm based on the standard translated text ofthe test text and the translated text with the optimum probability with.Similarly, the text evaluation result of the translated text with therandom probability is obtained by calculating through the overallevaluation algorithm based on the standard translated text of the testtext and the translated text with the random probability.

The overall evaluation algorithm is used for evaluating the textsemantic consistency of the translated text, and is typically, forexample, a bilingual evaluation understudy (BLEU) algorithm.

At block S230, the original translation model is modified based on thetext evaluation result of the translated text with the optimumprobability and the text evaluation result of the translated text withthe random probability to obtain the modified translation model.

In this embodiment, the original translation model is modified based onthe text evaluation result of the translated text with the optimumprobability and the text evaluation result of the translated text withthe random probability. In detail, the original translation model may bemodified based on a calculation result such as a difference, a squareddifference between the text evaluation result of the translated textwith the optimum probability and the text evaluation result of thetranslated text with the random probability.

At block S240, the source language text is obtained.

At block S250, the source language text is translated with the modifiedtranslation model to obtain the target language text corresponding tothe source language text.

This embodiment of the present disclosure provides the text translationmethod, which embodies the text evaluation result and manners ofobtaining the translated text with the optimum probability and thetranslated text with the random probability, and introduces modelmodification steps, so that the original translation model is modifiedquickly, simply and effectively, and the translation accuracy of themodified translation model is effectively improved.

FIG. 3 is a flow chart of a text translation method according to anembodiment of the present disclosure. The present embodiment is on thebasis of the above-described embodiments. This embodiment provides animplementation of embodying the overall evaluation algorithm as anincentive algorithm, embodying a manner of obtaining the text evaluationresult corresponding to the incentive algorithm, embodying a modelmodification manner, and embodying a structure of the modifiedtranslation model.

Correspondingly, the method includes the following.

At block S310, the translated text with the optimum probability and thetranslated text with the random probability of the original translationmodel to the test text are obtained.

At block S320, a first vector corresponding to the translated text withthe optimum probability and a second vector corresponding to thestandard translated text of the test text are obtained based on arecurrent neural network (RNN) trained based on a forward word order,and a third vector corresponding to the standard translated text isobtained based on an RNN trained based on a reverse word order.

In this embodiment, the overall evaluation algorithm, is an incentivealgorithm, and blocks 320 to 350 are processes of calculating the textevaluation result with the incentive algorithm.

In this embodiment, the RNN trained based on the forward word order,refers to an RNN in which a text with a normal word order is used as atraining sample. The RNN trained based on the reverse word order, refersto an RNN in which a text with a reverse word order is used as atraining sample. The training sample of the RNN trained based on theforward word order is same as a sample of a normal word ordercorresponding to the training sample of the RNN trained based on thereverse word order. Based on the above description, the RNN trainedbased on the forward word order and the RNN trained based on the reverseword order may guarantee that two vectors output by the two RNNs for thesame input data have the lowest similarity.

Based on the above characteristics, in this embodiment, the RNN trainedbased on the forward word order and the RNN trained based on the reverseword order are used to obtain the second vector and the third vectorcorresponding to the standard translated text of the test text. Inaddition, the first vector corresponding to the translated text with theoptimum probability is obtained by using the RNN trained based on theforward word order. The contextual semantic consistency of thetranslated text with the optimum probability may be determined based ona similarity between the first vector and the second vector and asimilarity between the first vector and the third vector. When thesimilarity between the first vector and the second vector is greaterthan the similarity between the first vector and the third vector, thecontextual semantic consistency of the translated text with the optimumprobability is good; and when the similarity between the first vectorand the second vector is smaller than the similarity between the firstvector and the third vector, the contextual semantic consistency of thetranslated text with the optimum probability is poor.

At block S330, a similarity between the first vector and the thirdvector is subtracted from a similarity between the first vector and thesecond vector to obtain a difference as the text evaluation result ofthe translated text with the optimum probability.

In this embodiment, the text evaluation result of the translated textwith the optimum probability is the difference obtained by subtractingthe similarity between the first vector and the third vector from thesimilarity between the first vector and the second vector. The greaterthe difference is, the better the contextual semantic consistency of thetranslated text with the optimum probability is.

At block S340, a fourth vector corresponding to the translated text withthe random probability is obtained based on the RNN trained based on theforward word order.

Similarly, in the present embodiment, the RNN trained based on theforward word order is also used to obtain the fourth vectorcorresponding to the translated text with the random probability. Andthen, the contextual semantic consistency of the translated text withthe random probability may be determined based on the similarity betweenthe fourth vector and the second vector and the similarity between thefourth vector and the third vector. When the similarity between thefourth vector and the second vector is greater than the similaritybetween the fourth vector and the third vector, the translated text withthe random probability is considered to have good semantic consistency;and when the similarity between the fourth vector and the second vectoris smaller than the similarity between the fourth vector and the thirdvector, the translated text with the random probability is considered tohave poor semantic consistency.

At block S350, a similarity between the fourth vector and the thirdvector is subtracted from a similarity between the fourth vector and thesecond vector to obtain a difference as the text evaluation result ofthe translated text with the random probability.

Similarly, in the present embodiment, the text evaluation result of thetranslated text with the random probability is a difference obtained bysubtracting the similarity between the fourth vector and the thirdvector from the similarity between the fourth vector and the secondvector. The greater the difference is, the better the contextualsemantic consistency of the translated text with the random probabilityis.

At block S360, the original translation model is modified based on adifference obtained by subtracting the text evaluation result of thetranslated text with the random probability from the text evaluationresult of the translated text with the optimum probability.

In detail, in the present embodiment, the original translation model ismodified based on the difference obtained by subtracting the textevaluation result of the translated text with the random probabilityfrom the text evaluation result of the translated text with the optimumprobability. The difference may reflect a comparison result ofconsistency of the translated text with the optimum probability and thetranslated text with the random probability. When the difference is apositive number, it is determined that the consistency of the translatedtext with the optimum probability is better than the consistency of thetranslated text with the random probability; and when the difference isa negative number, it is determined that the consistency of thetranslated text with the optimum probability is worse than theconsistency of the translated text with the random probability.

Further, the modification manner of the original translation model maybe that the difference obtained by subtracting the text evaluationresult of the translated text with the random probability from the textevaluation result of the translated text with the optimum probability ismultiplied by a gradient of the original translation model to obtain themodified translation model.

At block S370, the source language text is obtained.

At block S380, the source language text is translated with the modifiedtranslation model to obtain the target language text corresponding tothe source language text.

In this embodiment, as shown in FIG. 4, the modified translation modelincludes: an encoder 1 based on self-attention mechanism, a firstdecoder 2 based on self-attention mechanism and a second decoder 3 basedon self-attention mechanism. The encoder 1 and the first decoder 2 forma Transformer model based on self-attention mechanism.

The second decoder 3 includes the first decoder 2, N multi-headself-attention mechanism layers 32 and N fully-connected forward neuralnetworks 31, and N is the number of network blocks included in the firstdecoder. The N fully-connected forward neural networks 31 are connectedwith Feed Forward layers in the N network blocks and are positioned infront of the Feed Forward layers, and the N multi-head self-attentionmechanism layers 32 are connected with the N fully-connected forwardneural networks 31 and are positioned in front of the fully-connectedforward neural networks 31. An input of a newly-added multi-headself-attention mechanism layer 32 includes an output of the firstdecoder 2; and an input of the multi-head self-attention mechanismlayers 33 before the newly-added multi-head self-attention mechanismlayer 32 includes an output of the encoder 1.

Further, FIG. 4 also illustrates a recurrent neural network 4 forcalculating a difference obtained by subtracting the text evaluationresult of the translated text with the random probability from the textevaluation result of the translated text with the optimum probability.The recurrent neural network 4 includes the RNN trained based on forwardword order and the RNN trained based on reverse word order. Therecurrent neural network 4 directly obtains the output result of thesecond decoder 3 and feeds back the difference obtained by subtractingthe text evaluation result of the translated text with the randomprobability from the text evaluation result of the translated text withthe optimum probability to the second decoder to modify the translationmodel.

This embodiment of the present disclosure provides the text translationmethod, which embodies the overall evaluation algorithm as the incentivealgorithm and embodies the manner of obtaining the text evaluationresult corresponding to the incentive algorithm, so that the textevaluation result may correctly reflect translation accuracy of theoriginal translation model, and further, the original translation modelmay be more effectively modified. The method further embodies themodification manner and the structure of the modified translation model,so that the modified translation model may effectively modify itsparameters based on the text evaluation result.

It should be noted that, in a conventional neural network machinetranslation model, sentences in a batch are generally randomly selected.However, in this embodiment, when the original translation model istrained, sentences in a batch are required to be all the sentencesincluded in a chapter, so as to ensure that the first decoder may outputan individual translation result of each sentence in the chapter. Andthen the second decoder may use the output result of the first decoderas the context translation information, and translate with reference tothe context translation information, thereby further improving thecontextual semantic consistency of the output translation.

On the basis of the above embodiments, the overall evaluation algorithm,is embodied as the BLEU algorithm.

Correspondingly, obtaining the text evaluation result of the translatedtext with the optimum probability and the text evaluation result of thetranslated text with the random probability based on the overallevaluation algorithm and the standard translated text of the test textmay include: calculating a BLEU value between the standard translatedtext of the test text and the translated text with the optimumprobability, and taking the calculated BLEU value as the text evaluationresult of the translated text with the optimum probability; andcalculating a BLEU value between the standard translated text of thetest text and the translated text with the random probability, andtaking the calculated BLEU value as the text evaluation result of thetranslated text with the random probability.

Such an arrangement is advantageous in that the text evaluation resultmay correctly reflect the translation accuracy of the originaltranslation model.

FIG. 5 is a block diagram of a text translation apparatus according toan embodiment of the present disclosure. As shown in FIG. 5, theapparatus includes: a text obtaining module 401 and a text translationmodule 402.

The text obtaining module 401 is configured to obtain a source languagetext.

The text translation module 402 is configured to translate the sourcelanguage text with a modified translation model to obtain a targetlanguage text corresponding to the source language text, the modifiedtranslation model being obtained by translating a test text with anoriginal translation model to obtain one or more translated texts fortraining, and by modifying the original translation model based on atext evaluation result of the one or more translated texts for training,the translated text for training being an output result aftertranslating through the original translation model, and the textevaluation result for evaluating a contextual semantic relation in thetranslated text for training.

This embodiment of the present disclosure provides the text translationapparatus. The apparatus first obtains the source language text throughthe text obtaining module 401; and then, translates the source languagetext through the text translation module 402 by using the modifiedtranslation model to obtain the target language text corresponding tothe source language text. The modified translation model is atranslation model obtained by modifying the original translation modelbased on the text evaluation result of the translated text for training,the translated text for training is an output result after translatingthrough the original translation model, and the text evaluation resultis used for evaluating a contextual semantic relation in the translatedtext for training.

The apparatus overcomes technical defects of poor contextual semanticsconsistency and low fluency of the translated text obtained bytranslating each sentence independently, improves a translation accuracyof the translation model through effectively modifying the translationmodel, and further improves contextual semantics consistency and fluencyof the translated text.

On the basis of the above embodiments, the text evaluation result of thetranslated text for training may include: a text evaluation result of atranslated text with an optimum probability and a text evaluation resultof a translated text with a random probability.

On the basis of the above embodiments, the apparatus further includes atranslation obtaining module, a translation evaluation module and amodel modification module.

The translation obtaining module is configured to obtain the translatedtext with the optimum probability and the translated text with therandom probability of the original translation model to a test textbefore the source language text is translated by using the modifiedtranslation model.

The translation evaluation module is configured to obtain the textevaluation result of the translated text with the optimum probabilityand the text evaluation result of the translated text with the randomprobability based on an overall evaluation algorithm and a standardtranslated text of the test text. The overall evaluation algorithm isconfigured to evaluate a text semantic consistency of a whole translatedtext.

The model modification module is configured to modify the originaltranslation model based on the text evaluation result of the translatedtext with the optimum probability and the text evaluation result of thetranslated text with the random probability.

On the basis of the above embodiments, the translation obtaining modulemay include: a first obtaining unit and a second obtaining unit.

The first obtaining unit is configured to translate the test text withthe original translation model, and selecting a target word with amaximum probability during the translating as a translation result of aword to obtain the translated text with the optimum probability.

The second obtaining unit is configured to translate the test text withthe original translation model, and determining a translation result ofa word based on a probability distribution of the target word during thetranslating to obtain the translated text with the random probability.

On the basis of the above embodiments, the overall evaluation algorithmmay be a BLEU algorithm.

Correspondingly, the translation evaluation module may include: a firstBLEU calculating unit and a second BLEU calculating unit.

The first BLEU calculating unit is configured to calculate a BLEU valuebetween the standard translated text of the test text and the translatedtext with the optimum probability, and take the calculated BLEU value asthe text evaluation result of the translated text with the optimumprobability.

The second BLEU calculating unit is configured to calculate a BLEU valuebetween the standard translated text of the test text and the translatedtext with the random probability, and take the calculated BLEU value asthe text evaluation result of the translated text with the randomprobability.

On the basis of the above embodiments, the overall evaluation algorithmmay be an incentive algorithm.

Correspondingly, the translation evaluation module may further include:a first vector obtaining unit, a first evaluation unit, a second vectorobtaining unit and a second evaluation unit.

The first vector obtaining unit is configured to obtain a first vectorcorresponding to the translated text with the optimum probability and asecond vector corresponding to the standard translated text of the testtext based on a recurrent neural network (RNN) trained based on aforward word order, and obtain a third vector corresponding to thestandard translated text based on an RNN trained based on a reverse wordorder.

The first evaluation unit is configured to subtract a similarity betweenthe first vector and the third vector from a similarity between thefirst vector and the second vector to obtain a difference as the textevaluation result of the translated text with the optimum probability.

The second vector obtaining unit is configured to obtain a fourth vectorcorresponding to the translated text with the random probability basedon the RNN trained based on the forward word order.

The second evaluation unit is configured to subtract a similaritybetween the fourth vector and the third vector from a similarity betweenthe fourth vector and the second vector to obtain a difference as thetext evaluation result of the translated text with the randomprobability.

On the basis of the above embodiments, the model modification module maybe configured to: modify the original translation model based on adifference obtained by subtracting the text evaluation result of thetranslated text with the random probability from the text evaluationresult of the translated text with the optimum probability.

On the basis of the above embodiments, the modified translation modelmay in detail include: an encoder based on self-attention mechanism, afirst decoder based on self-attention mechanism and a second decoderbased on self-attention mechanism, the encoder and the first decoderforming a Transformer model based on self-attention mechanism.

The second decoder includes the first decoder, N multi-headself-attention mechanism layers and N fully-connected forward neuralnetworks, N being the number of network blocks included in the firstdecoder.

The N fully-connected forward neural networks are connected with FeedForward layers in the N network blocks and are positioned in front ofthe Feed Forward layers, and the N multi-head self-attention mechanismlayers are connected with the N fully-connected forward neural networksand are positioned in front of the N fully-connected forward neuralnetworks.

An input of a newly-added multi-head self-attention mechanism layercomprises an output of the first decoder.

An input of a multi-head self-attention mechanism layers before thenewly-added multi-head self-attention mechanism layer comprises anoutput of the encoder.

The text translation apparatus provided by this embodiment of thepresent disclosure may be configured to execute the text translationmethod provided by any embodiment of the present disclosure, hascorresponding functional modules and realizes the same beneficialeffects.

FIG. 6 is a block diagram of a device according to an embodiment of thepresent disclosure. FIG. 6 illustrates a block diagram of an exemplarydevice 12 for implementing embodiments of the present disclosure. Thedevice 12 illustrated in FIG. 6 is only illustrated as an example, andshould not be considered as any restriction on the function and theusage range of embodiments of the present disclosure.

As illustrated in FIG. 6, the device 12 is in the form of ageneral-purpose computing apparatus. The device 12 may include, but isnot limited to, one or more processors or processing units 16, a systemmemory 28, and a bus 18 connecting different system components(including the system memory 28 and the processing unit 16).

The bus 18 represents one or more of several types of bus architectures,including a memory bus or a memory controller, a peripheral bus, agraphic acceleration port (GAP), a processor, or a local bus using anybus architecture in a variety of bus architectures. For example, thesearchitectures include, but are not limited to, an industry standardarchitecture (ISA) bus, a micro-channel architecture (MCA) bus, anenhanced ISA bus, a video electronic standards association (VESA) localbus, and a peripheral component interconnect (PCI) bus.

Typically, the device 12 may include multiple kinds of computer-readablemedia. These media may be any storage media accessible by the device 12,including transitory or non-transitory storage medium and movable orunmovable storage medium.

The memory 28 may include a computer-readable medium in a form ofvolatile memory, such as a random-access memory (RAM) 30 and/or ahigh-speed cache memory 32. The device 12 may further include othertransitory/non-transitory storage media and movable/unmovable storagemedia. In way of example only, the storage system 34 may be used to readand write non-removable, non-volatile magnetic media (not shown in thefigure, commonly referred to as “hard disk drives”). Although notillustrated in FIG. 6, it may be provided a disk driver for reading andwriting movable non-volatile magnetic disks (e.g. “floppy disks”), aswell as an optical driver for reading and writing movable non-volatileoptical disks (e.g. a compact disc read only memory (CD-ROM, a digitalvideo disc read only Memory (DVD-ROM), or other optical media). In thesecases, each driver may be connected to the bus 18 via one or more datamedium interfaces. The memory 28 may include at least one programproduct, which has a set of (for example at least one) program modulesconfigured to perform the functions of embodiments of the presentdisclosure.

A program/application 40 with a set of (at least one) program modules 42may be stored in memory 28. The program modules 42 may include, but notlimit to, an operating system, one or more application programs, otherprogram modules and program data, and any one or combination of aboveexamples may include an implementation in a network environment. Theprogram modules 42 are generally configured to implement functionsand/or methods described in embodiments of the present disclosure.

The device 12 may also communicate with one or more external devices 14(e.g., a keyboard, a pointing device, a display 24, and etc.) and mayalso communicate with one or more devices that enables a user tointeract with the computer system/server 12, and/or any device (e.g., anetwork card, a modem, and etc.) that enables the computer system/server12 to communicate with one or more other computing devices. This kind ofcommunication can be achieved by the input/output (I/O) interface 22. Inaddition, the device 12 may be connected to and communicate with one ormore networks such as a local area network (LAN), a wide area network(WAN) and/or a public network such as the Internet through a networkadapter 20. As shown in FIG. 6, the network adapter 20 communicates withother modules of the device 12 over bus 18. It should be understood thatalthough not shown in the figure, other hardware and/or software modulesmay be used in combination with the device 12, which including, but notlimited to, microcode, device drivers, redundant processing units,external disk drive arrays, RAID systems, tape drives, as well as databackup storage systems and the like.

The processing unit 16 can perform various functional applications anddata processing by running programs stored in the system memory 28, forexample, to perform the text translation method provided by embodimentsof the present disclosure, i.e., obtaining a source language text; andtranslating the source language text with a modified translation modelto obtain a target language text corresponding to the source languagetext, the modified translation model being obtained by modifying anoriginal translation model based on a text evaluation result of one ormore translated texts for training, the translated text for trainingbeing an output result after translating through the originaltranslation model, and the text evaluation result for evaluating acontextual semantic relation in the translated text for training.

Embodiment of the present disclosure further provides a storage mediumincluding computer executable instructions. When the computer executableinstructions are executed by a computer processor, the text translationmethod according to embodiments of the present disclosure is executed,i.e., obtaining a source language text; and translating the sourcelanguage text with a modified translation model to obtain a targetlanguage text corresponding to the source language text, the modifiedtranslation model being obtained by modifying an original translationmodel based on a text evaluation result of one or more translated textsfor training, the translated text for training being an output resultafter translating through the original translation model, and the textevaluation result for evaluating a contextual semantic relation in thetranslated text for training.

The computer storage medium according to embodiments of the presentdisclosure may adopt any combination of one or more computer readablemedia. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. The computer readablestorage medium may be, but is not limited to, for example, anelectrical, magnetic, optical, electromagnetic, infrared, orsemiconductor system, apparatus, device, component or any combinationthereof. A specific example of the computer readable storage mediainclude (a non-exhaustive list): an electrical connection having one ormore wires, a portable computer disk, a hard disk, a random accessmemory (RAM), a read only memory (ROM), an Erasable Programmable ReadOnly Memory (EPROM) or a flash memory, an optical fiber, a compact discread-only memory (CD-ROM), an optical memory component, a magneticmemory component, or any suitable combination thereof. In context, thecomputer readable storage medium may be any tangible medium including orstoring programs. The programs may be used by an instruction executedsystem, apparatus or device, or a connection thereof.

The computer readable signal medium may include a data signalpropagating in baseband or as part of carrier which carries computerreadable program codes. Such propagated data signal may be in manyforms, including but not limited to an electromagnetic signal, anoptical signal, or any suitable combination thereof. The computerreadable signal medium may also be any computer readable medium otherthan the computer readable storage medium, which may send, propagate, ortransport programs used by an instruction executed system, apparatus ordevice, or a connection thereof.

The program code stored on the computer readable medium may betransmitted using any appropriate medium, including but not limited towireless, wireline, optical fiber cable, RF, or any suitable combinationthereof.

The computer program code for carrying out operations of embodiments ofthe present disclosure may be written in one or more programminglanguages. The programming language includes an object-orientedprogramming language, such as Java, Smalltalk, C++, as well asconventional procedural programming language, such as “C” language orsimilar programming language. The program code may be executed entirelyon a user's computer, partly on the user's computer, as a separatesoftware package, partly on the user's computer, partly on a remotecomputer, or entirely on the remote computer or server. In a case of theremote computer, the remote computer may be connected to the user'scomputer or an external computer (such as using an Internet serviceprovider to connect over the Internet) through any kind of network,including a Local Area Network (LAN) or a Wide Area Network (WAN).

It should be noted that, the above are only preferred embodiments andapplied technical principles of the present disclosure. Those skilled inthe art should understand that, the present disclosure is not limited tothe specific embodiments described herein, and various obvious changes,readjustments and substitutions that are made by those skilled in theart will not depart from the scope of the present disclosure. Therefore,although the present disclosure has been described in detail by theabove embodiments, the present disclosure is not limited to the aboveembodiments, and more other equivalent embodiments may be includedwithout departing from the concept of the present disclosure, and thescope of the present disclosure is determined by the scope of theappended claims.

What is claimed is:
 1. A text translation method, comprising: obtaining,by one or more computing devices, a source language text; andtranslating, by the one or more computing devices, the source languagetext with a modified translation model to obtain a target language textcorresponding to the source language text, the modified translationmodel being obtained by translating a test text with an originaltranslation model to obtain one or more translated texts for training,and modifying the original translation model based on a text evaluationresult of the one or more translated texts for training, and the textevaluation result for evaluating a contextual semantic relation in thetranslated text for training.
 2. The method of claim 1, wherein the textevaluation result of the one or more translated texts for training,comprises: a text evaluation result of a translated text with an optimumprobability, and a text evaluation result of a translated text with arandom probability.
 3. The method of claim 2, further comprising:translating, by the one or more computing devices, the test text withthe original translation model to obtain the translated text with theoptimum probability and the translated text with the random probability;obtaining, by the one or more computing devices, the text evaluationresult of the translated text with the optimum probability and the textevaluation result of the translated text with the random probabilitybased on an overall evaluation algorithm and a standard translated textof the test text, wherein the overall evaluation algorithm is configuredto evaluate a text semantic consistency of a whole translated text; andmodifying, by the one or more computing devices, the originaltranslation model based on the text evaluation result of the translatedtext with the optimum probability and the text evaluation result of thetranslated text with the random probability.
 4. The method of claim 3,wherein obtaining the translated text with the optimum probability andthe translated text with the random probability of the originaltranslation model to the test text comprises: translating the test textwith the original translation model, and selecting a target word with amaximum probability during the translating as a translation result of aword to obtain the translated text with the optimum probability; andtranslating the test text with the original translation model, anddetermining a translation result of a word based on a probabilitydistribution of the target word during the translating to obtain thetranslated text with the random probability.
 5. The method of claim 3,wherein the overall evaluation algorithm is a bilingual evaluationunderstudy (BLEU) algorithm; obtaining the text evaluation result of thetranslated text with the optimum probability and the text evaluationresult of the translated text with the random probability based on theoverall evaluation algorithm and the standard translated text of thetest text comprises: calculating a BLEU value between the standardtranslated text of the test text and the translated text with theoptimum probability, and taking the calculated BLEU value as the textevaluation result of the translated text with the optimum probability;and calculating a BLEU value between the standard translated text of thetest text and the translated text with the random probability, andtaking the calculated BLEU value as the text evaluation result of thetranslated text with the random probability.
 6. The method of claim 3,wherein the overall evaluation algorithm is an incentive algorithm;obtaining the text evaluation result of the translated text with theoptimum probability and the text evaluation result of the translatedtext with the random probability based on the overall evaluationalgorithm and the standard translated text of the test text comprises:obtaining a first vector corresponding to the translated text with theoptimum probability and a second vector corresponding to the standardtranslated text of the test text based on a recurrent neural network(RNN) trained based on a forward word order, and obtaining a thirdvector corresponding to the standard translated text based on an RNNtrained based on a reverse word order; subtracting a similarity betweenthe first vector and the third vector from a similarity between thefirst vector and the second vector to obtain a difference as the textevaluation result of the translated text with the optimum probability;obtaining a fourth vector corresponding to the translated text with therandom probability based on the RNN trained based on the forward wordorder; and subtracting a similarity between the fourth vector and thethird vector from a similarity between the fourth vector and the secondvector to obtain a difference as the text evaluation result of thetranslated text with the random probability.
 7. The method of claim 3,wherein modifying the original translation model based on the textevaluation result of the translated text with the optimum probabilityand the text evaluation result of the translated text with the randomprobability comprises: modifying the original translation model based ona difference obtained by subtracting the text evaluation result of thetranslated text with the random probability from the text evaluationresult of the translated text with the optimum probability.
 8. A device,comprising: one or more processors; and a storage device, configured tostore one or more programs; wherein, when the one or more programs areexecuted by the one or more processors, the one or more processors areconfigured to implement: obtaining a source language text; andtranslating the source language text with a modified translation modelto obtain a target language text corresponding to the source languagetext, the modified translation model being obtained by translating atest text with an original translation model to obtain one or moretranslated texts for training, and modifying the original translationmodel based on a text evaluation result of the one or more translatedtexts for training, and the text evaluation result for evaluating acontextual semantic relation in the translated text for training.
 9. Thedevice of claim 8, wherein the text evaluation result of the one or moretranslated texts for training, comprises: a text evaluation result of atranslated text with an optimum probability, and a text evaluationresult of a translated text with a random probability.
 10. The device ofclaim 9, wherein the one or more processors are configured to implement:translating the test text with the original translation model to obtainthe translated text with the optimum probability and the translated textwith the random probability; obtaining the text evaluation result of thetranslated text with the optimum probability and the text evaluationresult of the translated text with the random probability based on anoverall evaluation algorithm and a standard translated text of the testtext, wherein the overall evaluation algorithm is configured to evaluatea text semantic consistency of a whole translated text; and modifyingthe original translation model based on the text evaluation result ofthe translated text with the optimum probability and the text evaluationresult of the translated text with the random probability.
 11. Thedevice of claim 10, wherein obtaining the translated text with theoptimum probability and the translated text with the random probabilityof the original translation model to the test text comprises:translating the test text with the original translation model, andselecting a target word with a maximum probability during thetranslating as a translation result of a word to obtain the translatedtext with the optimum probability; and translating the test text withthe original translation model, and determining a translation result ofa word based on a probability distribution of the target word during thetranslating to obtain the translated text with the random probability.12. The device of claim 10, wherein the overall evaluation algorithm isa bilingual evaluation understudy (BLEU) algorithm; obtaining the textevaluation result of the translated text with the optimum probabilityand the text evaluation result of the translated text with the randomprobability based on the overall evaluation algorithm and the standardtranslated text of the test text comprises: calculating a BLEU valuebetween the standard translated text of the test text and the translatedtext with the optimum probability, and taking the calculated BLEU valueas the text evaluation result of the translated text with the optimumprobability; and calculating a BLEU value between the standardtranslated text of the test text and the translated text with the randomprobability, and taking the calculated BLEU value as the text evaluationresult of the translated text with the random probability.
 13. Thedevice of claim 10, wherein the overall evaluation algorithm is anincentive algorithm; obtaining the text evaluation result of thetranslated text with the optimum probability and the text evaluationresult of the translated text with the random probability based on theoverall evaluation algorithm and the standard translated text of thetest text comprises: obtaining a first vector corresponding to thetranslated text with the optimum probability and a second vectorcorresponding to the standard translated text of the test text based ona recurrent neural network (RNN) trained based on a forward word order,and obtaining a third vector corresponding to the standard translatedtext based on an RNN trained based on a reverse word order; subtractinga similarity between the first vector and the third vector from asimilarity between the first vector and the second vector to obtain adifference as the text evaluation result of the translated text with theoptimum probability; obtaining a fourth vector corresponding to thetranslated text with the random probability based on the RNN trainedbased on the forward word order; and subtracting a similarity betweenthe fourth vector and the third vector from a similarity between thefourth vector and the second vector to obtain a difference as the textevaluation result of the translated text with the random probability.14. The device of claim 10, wherein modifying the original translationmodel based on the text evaluation result of the translated text withthe optimum probability and the text evaluation result of the translatedtext with the random probability comprises: modifying the originaltranslation model based on a difference obtained by subtracting the textevaluation result of the translated text with the random probabilityfrom the text evaluation result of the translated text with the optimumprobability.
 15. A non-transient machine-readable storage mediumcomprising a computer executable instruction, wherein when the computerexecutable instruction is executed by a computer processor, the computerexecutable instruction is configured to perform a text translationmethod comprising: obtaining a source language text; and translating thesource language text with a modified translation model to obtain atarget language text corresponding to the source language text, themodified translation model being obtained by translating a test textwith an original translation model to obtain one or more translatedtexts for training, and modifying the original translation model basedon a text evaluation result of the one or more translated texts fortraining, and the text evaluation result for evaluating a contextualsemantic relation in the translated text for training.
 16. Thenon-transient machine-readable storage medium of claim 15, wherein thetext evaluation result of the one or more translated texts for training,comprises: a text evaluation result of a translated text with an optimumprobability, and a text evaluation result of a translated text with arandom probability.
 17. The non-transient machine-readable storagemedium of claim 16, wherein the method further comprising: translatingthe test text with the original translation model to obtain thetranslated text with the optimum probability and the translated textwith the random probability; obtaining the text evaluation result of thetranslated text with the optimum probability and the text evaluationresult of the translated text with the random probability based on anoverall evaluation algorithm and a standard translated text of the testtext, wherein the overall evaluation algorithm is configured to evaluatea text semantic consistency of a whole translated text; and modifyingthe original translation model based on the text evaluation result ofthe translated text with the optimum probability and the text evaluationresult of the translated text with the random probability.
 18. Thenon-transient machine-readable storage medium of claim 17, whereinobtaining the translated text with the optimum probability and thetranslated text with the random probability of the original translationmodel to the test text comprises: translating the test text with theoriginal translation model, and selecting a target word with a maximumprobability during the translating as a translation result of a word toobtain the translated text with the optimum probability; and translatingthe test text with the original translation model, and determining atranslation result of a word based on a probability distribution of thetarget word during the translating to obtain the translated text withthe random probability.
 19. The non-transient machine-readable storagemedium of claim 17, wherein the overall evaluation algorithm is abilingual evaluation understudy (BLEU) algorithm; obtaining the textevaluation result of the translated text with the optimum probabilityand the text evaluation result of the translated text with the randomprobability based on the overall evaluation algorithm and the standardtranslated text of the test text comprises: calculating a BLEU valuebetween the standard translated text of the test text and the translatedtext with the optimum probability, and taking the calculated BLEU valueas the text evaluation result of the translated text with the optimumprobability; and calculating a BLEU value between the standardtranslated text of the test text and the translated text with the randomprobability, and taking the calculated BLEU value as the text evaluationresult of the translated text with the random probability.
 20. Thenon-transient machine-readable storage medium of claim 17, wherein theoverall evaluation algorithm is an incentive algorithm; obtaining thetext evaluation result of the translated text with the optimumprobability and the text evaluation result of the translated text withthe random probability based on the overall evaluation algorithm and thestandard translated text of the test text comprises: obtaining a firstvector corresponding to the translated text with the optimum probabilityand a second vector corresponding to the standard translated text of thetest text based on a recurrent neural network (RNN) trained based on aforward word order, and obtaining a third vector corresponding to thestandard translated text based on an RNN trained based on a reverse wordorder; subtracting a similarity between the first vector and the thirdvector from a similarity between the first vector and the second vectorto obtain a difference as the text evaluation result of the translatedtext with the optimum probability; obtaining a fourth vectorcorresponding to the translated text with the random probability basedon the RNN trained based on the forward word order; and subtracting asimilarity between the fourth vector and the third vector from asimilarity between the fourth vector and the second vector to obtain adifference as the text evaluation result of the translated text with therandom probability.